<template>
    <el-dialog :close-on-click-modal='false' title="屏蔽计划" :visible.sync="dialogVisible" @close="resetForm()" width="600px">
        <div v-loading="loading" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0)">
            <el-table :data="tableData" class="com_table" height="400px" ref="tableRef">
                <el-table-column prop="ad_id" label="计划 ID" width="180">
                </el-table-column>
                <el-table-column prop="name" label="计划名称">
                </el-table-column>
            </el-table>
        </div>
        <span slot="footer" class="dialog-footer">
            <el-button size="small" type="primary" class="el-button-width" @click="resetForm">关 闭</el-button>
        </span>
    </el-dialog>
</template>

<script>
export default {
    name: "",
    data() {
        return {
            dialogVisible:false,
            tableData: [],
        };
    },
    created() {
        
    },
    methods: {
        getData(id){
            this.dialogVisible = true
            this.getDataList(id)
        },

        //获取列表
        async getDataList(id) {
            this.loading = true;
            const { data: res } = await this.$http.post(
                "autodrop/Configure/ignoreCampaign",
                {
                    template_id:id
                }
            );
            if (res.code !== 200) {
                this.loading = false;
                this.$message.error(res.msg);
                return;
            } else {
                this.loading = false;
                this.tableData = res.data
            }
        },

        resetForm(){
            this.dialogVisible = false
        },
    },
    components: {},
};
</script>


<style scoped>

</style>
